<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>查看订单 - Powered By ${systemConfig.systemName}</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "/WEB-INF/template/common/include.ftl">
</head>
<style>
        .text { height: 8px; }
    </style>

<body class="input">
<form id="inputForm" class="validate" action="order!update.action" method="post">
			<input type="hidden" name="order.id" value="${order.id}" />
	<div class="body">
		
		<div id="print_div" align="center">
		<table  width="700px" border="1">
			
			
			<tr height=28px>
				<td  align="center" colspan=4>
					<img src="/upload/image/LOGO.png" width="280px"/>
				</td>
				
			</tr>
			<tr height=28px style="border-top:0px black dashed ;border-bottom:0px black dashed ;">
				<th  align="right" width="30%">
					订单编号:${order.orderSn}
				</th>
				<th  align="right" width="30%">
					取镜日期:<input type="text"   name="order.qjrq" value="${(order.qjrq)!}" class="formText"  style="width:100px;overflow:hidden;" />
				</th>				
				<th  align="right" width="40%">
					下单时间:${order.createDate?string("yyyy-MM-dd HH:mm:ss")}
				</th>
			</tr>
		</table>
		<table  width="700px" border="1">
				
				<tr>
					<th width="10%"  height=28px>
						排号:
					</th>
					<td width="20%">
						${(memberShili.paihao)!}
					</td>
					<th width="10%">
						验光单号:
					</th>
					<td width="20%">
						${(memberShili.yanguangNo)!}
					</td>
					<th>
						
					</th>
					<td>
						
					</td>
					
				</tr>
				
				
				
				<tr>
					<th width="10%" height=28px>
						姓名:
					</th>
					<td width="20%">
						${(memberShili.xingming)!}
					</td>
					<th width="10%">
						手机号:
					</th>
					<td width="20%">
						${(memberShili.shouji)!}
					</td>
					
					<th width="10%">
						住址:
					</th>
					<td width="30%">
						${(memberShili.address)!}
					</td>
				</tr>
				
				
				</table>
				<table width="700px" align=center; bordor=1 border="1">
				<tr  align=center;  height=28px>
					<th width='8%' align=center;>
						&nbsp;
					</th>
					<th width='8%' align=center;> 
						球镜
						SPH
					</th>
					<th width='8%' align=center;> 
						柱镜
						CYL
					</th>
					<th width='8%' align=center;> 
						轴位
					</th>
					<th width='8%' align=center;> 
						瞳距
					</th>
					<th width='8%' align=center;> 
						裸眼视力
					</th>
					<th width='8%' align=center;> 
						矫正视力
					</th>
					<th width='8%' align=center;> 
						主导眼
					</th>
					
					<th width='8%' align=center;> 
						棱镜
					</th>
					
					<th width='8%' align="center"> 
						基底
					</th>
					
					<th width='8%' align="center"> 
						瞳高
					</th>
					<th width='8%' align="center"> 
						下加光
					</th>
					
				</tr>
				
				<tr  align="center">
					<th align="center" height=28px>
						R
					</th>
					<td align="center">
						${(memberShili.rsph)!}
					</td align="center">
					<td align="center">
						${(memberShili.rcyl)!}
					</td>
					<td align="center">
						${(memberShili.rax)!}
					</td>
					<td align="center">
						${(memberShili.rtongju)!}
					</td>
					<td align="center">
						${(memberShili.rlysl)!}
					</td>
					<td align="center">
						${(memberShili.rjzsl)!}
					</td>
					<td align="center">
					
					<#if ( memberShili.rde == "1")> √</#if>
						
					</td>
					
					<td align="center">
						${(memberShili.rp)!}
					</td>
					
					<td align="center">
						${(memberShili.rbase)!}
					</td>
					
					<td align="center">
					
					${(memberShili.rph)!}			
					
						
					</td>
					<td align="center">
						${(memberShili.radd)!}
					</td>
					
				</tr>
				
				<tr >
					<th height=28px>
						L
					</th>
					<td align="center">
						${(memberShili.lsph)!}
					</td>
					<td align="center">
						${(memberShili.lcyl)!}
					</td>
					<td align="center">
						${(memberShili.lax)!}
					</td>
					<td align="center">
						${(memberShili.ltongju)!}
					</td>
					<td align="center">
						${(memberShili.llysl)!}
					</td>
					<td align="center">
						${(memberShili.ljzsl)!}
					</td>
					<td align="center">
												
					
					
					<#if ( memberShili.rde == "0")> √</#if>
					
					</td>
					
					<td align="center">
						${(memberShili.lp)!}
					</td>
					
					<td align="center">
						${(memberShili.lbase)!}
					</td>
					
					<td align="center">
						${(memberShili.lph)!}
					</td>
					<td align="center">
						${(memberShili.ladd)!}
					</td>
					
				</tr>
				
				
				</table>
				<table class="inputTable" width="700px"  align=center; bordor=1 border="1">
				<tr>
					
					<th height=28px width="10%">
						总瞳距:
					</th>
					<td width="10%">
						${(memberShili.tongju)!}
					</td>
					
					<th width="10%">
						远用:
					</th>
					<td width="8%">
					<#if ( memberShili.isYuan == "1")> √</#if>
					</td>
					<th width="10%">
						近用:
					</th>
					<td width="8%">
						<#if ( memberShili.isYuan == "0")> √</#if>
					</td>
					
					<th width="14%">
						调节反应量:
					</th>
					<td width="10%">
						${(memberShili.tiaojiefyl)!}
					</td>
					
					<th width="10%">
						验光师:
					</th>
					<td width="10%">
						${(memberShili.shiguangshi)!}
					</td>
					
					
					
				</tr>
				
				<tr>
					
					<th height=28px;>
						备注:
					</th>
					<td colspan=9>
						${(memberShili.memo)!}
					</td>
					
					
				</tr>
				</table>
		<table class="inputTable" width="700px"  align=center; bordor=1 border="1">
		
			<tr  style="border-top:0px black dashed ;" height=28px>
			<th>类别</th>
				<th>商品名称</th>
				<th>购买数量</th>
				<th>市场价</th>
				<th>会员价</th>
				
			</tr>
			<#list order.orderItemSet as list>
				<tr height=28px align="center">
				<td>
							${list.product.productCategory.name}
					</td>
					
					<td>
					<#if (list.product.productCategory.id == 1)!>
							${list.product.p1}/${list.product.p3}/${list.product.p4}/${list.product.p2}
					</#if>
					<#if (list.product.productCategory.id == 2)!>
							${list.product.p1}/${list.product.p2}/${list.product.p3}
					</#if>
					
					<#if (list.product.productCategory.id == 5)!>
							${list.product.p2}/${list.product.p3}
					</#if>
					</td>
					<td>
						${list.productQuantity}
					</td>
					<td>
						${list.product.marketPrice?string(priceUnitCurrencyFormat)}
					</td>
					<td>
						${list.productPrice?string(priceUnitCurrencyFormat)}
					</td>
					
				</tr>
			</#list>
			</table>
		<table class="inputTable" width="700px"  align=center; bordor=1 border="1">
			<tr height=28px style="border-top:0px black dashed ;border-bottom:0px black dashed ;" >
				<th  align="right"  width=12%>
					
				</th>
				<td  width=12%>
					
				</td>
				<th  align="right"  width=12%>
					订单金额:
				</th>
				<td  width=12%>
					<span id="totalAmount" class="red">${order.totalAmount?string(orderUnitCurrencyFormat)}</span>&nbsp;&nbsp;
				</td>
				<th  align="right"  width=12%>
					实收金额:
				</th>
				<td  width=12%>
					
				</td>
				
				<th  align="right"  width=12%>
					欠款金额:
				</th>
				<td  align="right"  width=12%>
					<br>
					
				</td>
			</tr>
			
			<tr height=28px style="border-top:0px black dashed ;border-bottom:0px black dashed ;" >
				<th  align="right"  width=12%>
					销售员:
				</th>
				<td  width=12%>
					<input type="text"   name="order.xsy" value="${(order.xsy)!}" class="formText" style="width:60px;overflow:hidden;" />
				</td>
				<th  align="right"  width=12%>
					签批人:
				</th>
				<td  width=12%>
					<input type="text"   name="order.qpr" value="${(order.qpr)!}" class="formText" style="width:60px;overflow:hidden;" />
				</td>
				<th  align="right"  width=12%>
					收银员:
				</th>
				<td  width=12%>
					<input type="text"   name="order.syy" value="${(order.syy)!}" class="formText" style="width:60px;overflow:hidden;"/>
				</td>
				
				<th  align="right"  width=12%>
					顾客签名:
				</th>
				<td  align="right"  width=12%>
					<br>
					
				</td>
			</tr>
			
			<tr height="20px;" style="border-top:0px black dashed ;border-bottom:0px black dashed ;" >
				<th  align="right"  width=13%>
					备注:
				</th>
				<td  colspan="7">
					<input type="text"   name="order.memo" value="${(order.memo)!}" class="formText" style="width:550px;overflow:hidden;"/>
				</td>
				
			</tr>
		</table>
		
		</div>
		<div class="buttonArea"  align="center">
			<input type="submit" class="formButton" value="确  定" hidefocus="true" />&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="button" class="formButton" onclick="window.history.back(); return false;" value="返  回" hidefocus="true" />
			
			<input type="button" class="formButton" onclick="PrintGridView(); return false;" value="打  印" hidefocus="true" />
		</div>
	</div>
	</form>
</body>
</html>
<script type="text/javascript">
        function PrintGridView() {
            // 打开一个新网页
            //var newwindow = window.open('printer','','');

            // 将指定DIV中的内容写入该网页
            //newwindow.document.write('<html><body>'+document.getElementById('print_div').innerHTML+'</body></html>');
            
            //alert(document.getElementById('print_div').innerHTML);
            //newwindow.document.close();

            // 打印该网页
            //newwindow.focus();
            //newwindow.print();

            // 打印完毕后关闭该窗口
            //newwindow.close();
            //return;
           
           document.body.innerHTML=document.getElementById('print_div').innerHTML;
		   window.print();
           
        }
  </script>
 
